Boolean logic, Logic gates and Logic circuits
Learning Objectives : Student should be able to -
Q1. a) What is Logic Gate ?
✬ A logic gate is a device that performs a boolean logic operation on one or more binary inputs and then produces a single binary output.
✬ Several logic gates are combined together to form a logic circuit which are designed to carry out a specific function.
✬ Logic gates are the fundamental building blocks of digital integrated circuits in Computer, Memory chips and Controlling devices.
b) Describe Truth-table with its purpose.
✬ A truth-table is a chart with rows and columns to trace the output from a logic-gate or logic circuit.
✬ Each column of the table is used to show different possible inputs and a single output of the logical function for the given logic gate or circuit.
✬ Each row of the table breaks down the logical function by listing all possible input values to calculate and find its output.
✬ NOT-gate is the only logic gate with one input, and the other five gates have two inputs.
c) Name and describe three basic logic gates with symbol.
✬ The three basic logic gates are ;
- NOT-gate
- AND-gate
- OR-gate
The relationship between the input and the output is of these three basic logic gates are as follows -
Name |
Symbol |
Description |
Truth-table |
||||||||||||||||||
NOT - gate | The output X is l, if the input A is NOT 1 Logic notation : X = NOT A Boolean expression : X = A |
|
|||||||||||||||||||
AND - gate | The output X is l, if both the inputs (A is 1 AND B is 1) Logic notation : X = A AND B Boolean expression : X = A . B |
|
|||||||||||||||||||
OR - gate | The output X is l, if either the inputs (A is 1 OR B is 1) and, if both the inputs A and B is 1. Logic notation : X = A OR B Boolean expression : X = A + B |
|
Note :
⇒ • (dot sign) represents the AND operation.
⇒ + (plus sign) represents the OR operation.
⇒ A Bar above the letter, e.g. A, represents the NOT operation.
b) The basic Logic gates can be combined to create another different types of logic-gates.
Describe NAND , NOR and ExOR logic-gates are formed by the combination of two basic logic-gates.
Name / Symbol |
Combination of logic-gates |
Description |
||||||||||||||||||||||||
NAND - gate Logic notation : |
Logic notation : X = NOT (A AND B) Boolean expression : X = (A . B) |
The output X is 1,
|
||||||||||||||||||||||||
NOR - gate Logic notation : |
Logic notation : X = NOT (A OR B) Boolean expression : X = (A + B) |
The output X is 1,
|
||||||||||||||||||||||||
Logic notation : Boolean Exp. : ExOR stands for 'Exclusive OR', because it is similar to OR-gate, except that, it excludes the boolean expression "OR BOTH 1" |
Logic notation :
X = (A OR B) AND Boolean exp. : X = (A + B) • (A•B) Logic notation : X = (A AND NOT B) OR (NOT A AND B) Boolean expression : X = (A•B)+(A•B) |
The output X is 1, if either
The output X is 1, if the inputs |
Note :
⇒ NAND is Inverse of AND-gate. Boolean expression for its output 'X' is, X = (A•B)
⇒ NOR is Inverse of OR-gate. Boolean expression for its output 'X' is, X = (A+B)
⇒ Output for ExOR-gate is similar to OR-gate,
except that it excludes (1 + 1 = 1) and replace it by (1 ⊕ 1 = 0) ;
Output of ExOR-gate is 'True', if both of its inputs are different.
Q2. Draw a logic circuit for a system which uses 3 switches A, B and C ; a combination of switches which determines whether an alarm X sounds.
If switch A is ON and switch B is OFF, or if switch B is ON and switch C is OFF then a signal to sound an alarm X=1 is produced.
Step-1 : Represent the given scenario in term of Logic statement.
Output X=1, if (A is ON AND B is OFF) OR (B is ON AND C is OFF)
Since, ON means 1 and OFF means 0 (i.e. NOT 1). The above logic statement could be written as -
Output X=1, if (A is 1 AND B is NOT 1) OR (B is 1 AND C is NOT 1)
Step-2 : Above Logic statement has two separate Groups, which are joined by OR-gate.
Draw each Group separately, using the inputs A, B and C.
Step-3 : Join the output of two groups with OR-gate to complete the Logic-circuit.
Q3. Draw a logic circuit for a chemical process protected by a logic circuit. There are three inpus to the logic circuit representing key parameters of the chemical process.
An alarm 'X' will give an output value of 1 depending on certain conditions in the chemical process. The following table describes the process conditions being monitored :
Parameter description Parameter Binary value Condition chemical reaction rate R 0 < 40 mol/ltr./sec. 1 >= 40 mol/ltr./sec. process temperature T 0 > 115 0C 1 <= 115 0C concentration of chemicals C 0 = 4 mol 1 > 4 mol
An alarm X, will generate the value 1 if any of the following combination of conditions occur :
either reaction rate < 40 mol/ltr./sec.
or concentration > 4 mol AND temperature > 115 0C
or reaction rate >= 40 mol/ltr./sec. AND temperature > 115 0C.
Step-1 : Convert the given conditions into Logic statements.
Step-2 : Draw Logic-circuit for each group of Logic statements.
- either
- OR
- OR
Step-3 : Join the first 2-groups (1 and 2) with OR-gate.
(R is NOT 1) OR (C is 1 AND T is NOT 1)
Step-4 : Finally complete the Logic-circuit by joining the Step-3 circuit with the 3rd groups using OR-gate.
(R is NOT 1) OR (C is 1 AND T is NOT 1) OR (R is 1 AND T is NOT 1)
Q4. Write a logic statement that corresponds with the following logic circuit.
Step-1 : Start writing the Logic statements for each logic-gate, connected to the input lines at the left side of the logic circuit, that produces a single output at its right side.
Step-2 : Identify the Logic-gates that joins the outputs of Step-1 and write the logic-statement to connect it.
(A is 1 AND B is 1) AND (B is NOT 1 OR C is 1)
Step-3 : Continue the Step-1 and Step-2 until the final output 'X' is attained.
Hence, the Logic-statement for the above logic-circuit is ;
Output X = 1, if the inputs (A is 1 AND B is 1) AND (B is NOT 1 OR C is 1)
Q5. Using NAND-gate as building-block, it is possible to create any Logic-gate like, NOT, AND and OR gate.
a) Describe how 'NAND gate', can replace the 'NOT gate' .
⇒ When a single input signal, is passed through an NAND-gate, the logic-circuit so formed, is equivalent to NOT-gate.
Input
AWorking
(A•A)Output
X = (A•A)0 (0•0) 1 1 (1•1) 0
b) Describe how 'NAND gate', can replace the 'AND gate' .
⇒ When an NAND-gate, is inverted, the logic-circuit so formed, is equivalent to AND-gate.
Input
AInput
BWorking
P1=(A•B)Output
X = P10 0 (0•0)=1 0 0 1 (0•1)=1 0 1 0 (1•0)=1 0 1 1 (1•1)=0 1
C) Describe how 'NAND gate', can replace the 'OR gate' .
⇒ When both the input signals to an NAND-gate, is inverted, the logic-circuit so formed, is equivalent to OR-gate.
Input
AInput
BWorking
P1=(A•B) X=P1Output
X0 0 (0•0)=1 1=0 0 0 1 (0•1)=0 0=1 1 1 0 (1•0)=0 0=1 1 1 1 (1•1)=0 0=1 1
Q6. Using NOR-gate as building-block, it is possible to create any Logic-gate like, NOT, AND and OR gate.
a) Describe how 'NOR gate', can replace the 'NOT gate' .
⇒ When a single input signal, is passed through an NOR-gate, the logic-circuit so formed, is equivalent to NOT-gate.
Input
AWorking
(A+A)Output
X = (A+A)0 (0+0) 1 1 (1+1) 0
b) Describe how 'NOR gate', can replace the 'OR gate' .
⇒ When an NOR-gate, is inverted, the logic-circuit so formed, is equivalent to OR-gate.
Input
AInput
BWorking
P1=(A+B)Output
X = P10 0 (0+0)=1 0 0 1 (0+1)=0 1 1 0 (1+0)=0 1 1 1 (1+1)=0 1
C) Describe how 'NOR gate', can replace the 'AND gate' .
⇒ When both the input signals to an NOR-gate, is inverted, the logic-circuit so formed, is equivalent to AND-gate.
Input
AInput
BWorking
P1=(A+B) X=P1Output
X0 0 (0+0)=1 1=0 0 0 1 (0+1)=1 1=0 0 1 0 (1+0)=1 1=0 0 1 1 (1+1)=0 0=1 1
Q7. Re-draw the following logic circuit using NAND gate only.
⇒ Identify the AND-gates followed by NOT-gate, and replace that group with NAND-gate,
since "NOT of AND-gate" is NAND-gate.
⇒ Replace the AND-gates with NOT of NAND-gate, (i.e. Inverse AND=gate twice will remain the same AND-gate).
⇒ Finally, the logic circuit with NAND-gates only would be ;
Q8. a) Complete the truth-table for the following logic circuit which is made up of NOR gates only.
⇒ Assign a name, like G1, G2, G3, ... X for each Logic-gate's Output in the Logic circuit. Like -
⇒ Complete the truth table by finding output of each logic gate and finally the output ‘X’ of the logic circuit.
Input Working Output A B G1=A, G2=B, G3=(G1+G2) X = G3 0 0 1 1 (1+1) = 0 1 0 1 1 0 (1+0) = 0 1 1 0 0 1 (0+1) = 0 1 1 1 0 0 (0+0) = 1 0
What single logic gate has the same function as the above circuit ?
⇒ The truth-table produced for the given logic circuit is equivalent to NAND-gate.
Hence, the given logic circuit can be replace by single NAND-gate.
b) Complete the truth-table for the following logic circuit which is made up of NAND gates only.
⇒ Assign a name, like G1, G2, G3, ... X for each Logic-gate's Output in the Logic circuit. Like -
⇒ Complete the truth table by finding output of each logic gate and finally the output ‘X’ of the logic circuit.
Input Working Output A B G1=A, G2=B, G3=(G1•G2) X = G3 0 0 1 1 (1•1) = 0 1 0 1 1 0 (1•0) = 1 0 1 0 0 1 (0•1) = 1 0 1 1 0 0 (0•0) = 1 0
What single logic gate has the same function as the above circuit ?
⇒ The truth-table produced for the given logic circuit is equivalent to NOR-gate.
Hence, the given logic circuit can be replace by single NOR-gate.
* * * * * * * * *
* * * * * *
* * *
*